Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ObservePropertyChanged, ObservePropertyChanging for INotifyPropertyChanged, INotifyPropertyChanging #151

Merged
merged 1 commit into from
Mar 1, 2024

Conversation

neuecc
Copy link
Member

@neuecc neuecc commented Mar 1, 2024

Add ObservePropertyChanged, ObservePropertyChanging extension methods for INotifyPropertyChanged, INotifyPropertyChanging.

This is the same as requested in #116, but implemented more efficiently.
@michaelstonis , thank you for the idea.
I had originally implemented it with ReactiveProperty as well, and realized that by using CallerArgumentExpression, we can avoid duplicate name specifications and reflection.
So, I decided to add it to the core.

@neuecc neuecc merged commit a6ef207 into main Mar 1, 2024
1 check passed
@neuecc neuecc deleted the observe-property branch March 1, 2024 05:46
@michaelstonis
Copy link
Contributor

This is wonderful.

It would be great if this could support nested properties like x => x.First.Second and I completely understand why that is not included for a first implementation. Would there be any interest in having support like that added? There are a lot of cases where having access to the second (and rarely third tier of property) can be extremely helpful. I would be glad to take a shot at it, if so.

@neuecc
Copy link
Member Author

neuecc commented Mar 2, 2024

Would there be any interest in having support like that added?

It would be nice to have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants